Tools for Efficient Workflows
Part 3: Version control for collaboration

Lukas Lehner and Maximilian Trenkmann

2023-08-12

Our plan

  1. Automatable reports

  2. Version control

    • for collaboration
  3. Dissemination and academic websites

  4. Containerisation for reproducible environments

  5. Encryption and advanced programming

What did we do so far?

  • Automatable reports

  • Version control

Expertise and interests

Session 3: Collaboration using version control

  • Part I: Shared repo workflow
  • Part II: Fork and pull workflow
  • Part III: Resolving issues

Recap last session

We discussed in the last session

  • Version control
    • Lectures: Conceptional underpinning of modern version control tools such as Git.
    • Lab exercises: Familiarize ourselves with the Git version control system and key Git operations, including committing, branching, and merging.

Today: Collaboration in teams using Git

Make careful use of your skillset

Source: illustrations by @allison_horst

Further Resources

Part I: Shared repo workflow

  • Single branch workflow
  • Trunk based workflow

Lab Session I 👩‍💻 👨‍💻

  • Single branch workflow
    • All changes are made to a single branch
  • Trunk based workflow
    • Changes are made to short lived feature branches that are merged back into a main branch.

Single branch workflow: (Exercise 1)

  • Clone the training repository
  • Add an image of the icon of your favorite programming language to the subsection with your name in “/A-Programming/Languages.qmd”.
  • Render the document to html to test whether it displays the image correctly.
  • Commit your changes.
  • Push your commit.
15:00

Single branch workflow: (Exercise 2)

  • Add a table to “-Programming-Languages.qmd” that includes all programming languages that you are able to use.
15:00

Trunk based workflow

  • Clone the repo again.
  • Branch off a another branch called “feature-YOURNAME”.
  • Add your own automatable report document to the folder B-Reports.
  • Add some of the image files in “D-Figures” to your automatable report.
  • Commit and publish the branch.
  • Go to Github and create a pull request.
20:00

Trunk based workflow

  • Switch branch to main now that your changes have been merged
  • Render your report

Part II: Fork and pull workflow

Changes are made in a separate repository and if necessary pulled into the original repository

Create your academic CV with Rmd

Lab Session II 👩‍💻 👨‍💻

Forking Exercise

  • Fork the repository
  • Start to complete the content of the CV
  • Notice any updates to the main repository
20:00

Fork and Pull Exercise

  • Add your name to the contributors in README.md
  • Send a pull request to have your name included in the original repository.
10:00

Part III: Resolving issues

Merge Conflicts

  • use .gitignore to make merging easier
  • commit, push and pull often

Large scale Issues and Changes

  • Create a new Repository
  • Copy Paste in Version A, then create a commit
  • Copy Paste in Version B
    • Copy paste in one folder at a time.
    • Create a new commit for each folder.

Lab Session III 👩‍💻 👨‍💻

Dealing with pull requests and merge conflicts

35:00

Recap the basic git steps (bonus)

40:00

Outlook

Outlook: our plan

  • Dissemination and academic websites
    • Lectures: we will discuss how to combine executable reports (session 1) with version control (sessions 2 and 3) to effectively disseminate our findings online.
    • Lab exercises: we will use GitHub Pages, and Quarto to create their own academic website.

See you